<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<fmt:setBundle basename="messages.messages"/>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<link rel="stylesheet" href="/Epics/jslib/global.css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><fmt:message key="siteName"/></title>
</head>

<body>
	<%@ include file="../Template/TMainLine.jsp" %>
	
	<h1>Search results:</h1>
	<table cellspacing="1" class="tablesorter">
		<thead>
			<tr>
				<th>
					Photo
				</th>
				<th>
					Title
				</th>
				<th>
					Description
				</th>
			</tr>
		</thead>
		
		<tbody>
			<c:forEach items="${resultList}" var="photo">
				<c:if test="${photo.pub}">
					<tr>	
						<td><a href="SViewPhoto?photoId=${photo.id }"><img src=".${photo.thumbnailLocation }" alt="${photo.description}"/></a></td>
						<td><a href="SViewPhoto?photoId=${photo.id }">${photo.title}</a></td>
						<td>${fn:substring(photo.description, 0, 200)}<!-- ${photo.description}--></td>
					</tr>
				</c:if>
			</c:forEach>
		</tbody>
	</table>
	
</body>
</html>